module manager {

    export class UIManager extends egret.Sprite {

        public gameLevel: egret.DisplayObjectContainer;

        private topLevel: egret.DisplayObjectContainer;

        private adLevel:egret.DisplayObjectContainer;

        public constructor() {
            super();

            this.gameLevel = new egret.DisplayObjectContainer();
            this.addChild(this.gameLevel);

            this.topLevel = new egret.DisplayObjectContainer();
            this.addChild(this.topLevel);

            this.adLevel = new egret.DisplayObjectContainer();
            this.addChild(this.adLevel);
        }

        public addGameWidget(widget: egret.DisplayObject): void {
            this.gameLevel.addChild(widget);
        }

        public addTopWidget(widget: egret.DisplayObject): void {
            this.topLevel.addChild(widget);
        }

        public addAdWidget(widget: egret.DisplayObject): void {
            this.adLevel.addChild(widget);
        }

    }

}